package com.yuaer.demo.springsparkjobhandlerdemo.executor.processor;

import com.yuaer.demo.springsparkjobhandlerdemo.executor.GlobalContext;
import com.yuaer.demo.springsparkjobhandlerdemo.executor.NodeContext;
import org.apache.spark.sql.Dataset;
import org.apache.spark.sql.Row;
import org.apache.spark.sql.SparkSession;

import java.util.List;
import java.util.Map;

/**
 * 节点执行器
 * 注意节点执行中不要触发Action操作, 否则可能会出现并行问题
 */
public interface NodeProcessor {
    Dataset<Row> process(
            GlobalContext globalContext,
            NodeContext nodeContext);
}
